package com.example.meetdroid.main;

import java.util.ArrayList;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

public class Globals {

	public static class SERVER{
		public static int PORT = 1337;
		public static String IP = "46.163.109.112";
	}
	public static class ACTIVITYRESULTS{
		
		public static final int OK = 0;
		public static final int CANCELD = -1;
		
	}
    public static class Separator
    {
        public static String MessageRegexp = "\\|#\\|";
        public static String ContentRegexp = "\\|-\\|";
        public static String Message = "|#|";
        public static String Content = "|-|";
    }
	public static class ACTIVITYREQUESTS{
		
		public static final int ADDCONTACT = 0;
		
		
	}
	public enum eCommand
    {
        Debug, Feedback, Text, Location, Picture,
        Reply, Confirmation, Decline, LogIn, LogOut,
        CreateUser, DeleteUser, RenameUser,
        GetContacts, AddContact, RemoveContact, WantToAddYouAsContact, ContactAdded,
        GetSecretKey;
        
        private static eCommand[] allValues = values();
        public static eCommand fromOrdinal(int n) {return allValues[n];}

    }
	public static String AppPath = "" ;
	public static Client Client;
	public static User CurrentUser;
	public static ArrayList<UserRequester> FriendRequests;
	public static ArrayList<User> FriendList;
	public static Context AppContext;
	public static void ShowToast(Context pContext,String pContent){
	
		Toast toast = Toast.makeText(pContext, pContent, 2000);
		toast.show();
		
	}
	public static User getFriendById(int xID){
		User _Friend = null;
		
		for(User _F : FriendList)
			if(_F.getID() == xID) _Friend = _F;
			
		return _Friend;
	}
	
}
